function param = model( param, aux)

    global search
    theta0=1;
    if param.K>0
        
        search = 0.5;
        try
            theta0= fzero(@ (x) model_1(x,param,aux), [2 50], optimset('display','off'));% calculate lower bound for m_l
        catch
            error('Change bounds within fzero') 
        end        

        search = 1;
        try
            theta0= fzero(@ (x) model_1(x,param,aux), [theta0+0.1, 200], optimset('display','off'));% solve for equilibrium m_l
        catch
            error('Change bounds within fzero') 
        end
    end
    
    search = 2;
    param = model_1(theta0,param,aux);
    
end
